<template>
  <div class="show">
    <MovieNav></MovieNav>
    <div class="main-block" v-for="v in arr" :key="v.id" @click="classicHandle(v.id)">
      <div class="main-picture">
        <img :src="v.img | fliterImg" />
      </div>
      <div class="wrap">
        <div class="column">
          <h1 class="title">{{ v.nm }}</h1>
          <div class="box-flex">{{ v.en }}</div>
          <div class="score">{{ v.type }}</div>
          <div class="actor">{{ v.showinfo }}</div>
        </div>
      </div>
      <div class="ticket1">
        <div class="ticket">
          <span>{{ v.sc }}</span
          >&nbsp;
          <span>分</span>
        </div>
      </div>
    </div>
    <div class="bottom"></div>
  </div>
</template>

<script>
import getLink from "@/api/getLink.js";

export default {
  data() {
    return {
      arr: [],
    };
  },

  mounted() {
    getLink("/apidl/movie/jd").then((res) => {
      this.arr = res.data;
    });
  },
  methods:{
    classicHandle(text){
    this.$router.push({path:"/xiangqing",query: { dd: text } })

    }
  }
};
</script>

<style scoped>
.main-block {
  padding-left: 0.3rem;
  padding-top: 0.2rem;
  display: flex;
  justify-content: space-between;
  position: relative;
  background: #fff;
}
.main-picture img {
  width: 1.5rem;
  height: 1.87rem;
  padding-bottom: 0.2rem;
}

.wrap {
  width: 4.3rem;
  margin-left: 0.2rem;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 0.2rem;
}

.column .title {
  font-size: 0.35rem;
  font-weight: 700;
}
.actor {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.08rem 0;
  color: #8c7e7e;
}

.box-flex {
  color: #8c7e7e;
  margin: 0.1rem 0;
  /* font-weight: 700; */
}
.score {
  color: #8c7e7e;
  /* padding-top: 0.2rem; */
}
.detail {
  color: #666666;
}

.grade {
  color: #faaf00;
  font-size: 0.3rem;
}
.ticket1 {
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 0.2rem;
}
.ticket {
  margin-right: 0.2rem;
  margin-top: 0.4rem;

  /* background: red; */
  width: 1rem;
  height: 0.6rem;
  color: white;
  text-align: center;
  border-radius: 14%;
  line-height: 0.6rem;
  font-size: 0.25rem;
}
.ticket span:nth-of-type(1) {
  color: #faaf00;
  font-size: 0.35rem;
}
.ticket span:nth-of-type(2) {
  color: rgb(209, 204, 204);
  font-size: 0.25rem;
}
.bottom {
  height: 1rem;
}
</style>